package com.kk.responsibilitychain;

import com.kk.responsibilitychain.request.PurchaseRequest;

public class Client {
    public static void main(String[] args) {
        PurchaseRequest purchaseRequest1 = new PurchaseRequest(1, 1, 4999);
        PurchaseRequest purchaseRequest2 = new PurchaseRequest(2, 2, 9999);
        PurchaseRequest purchaseRequest3 = new PurchaseRequest(3, 3, 11111);

        DepartmentApprover departmentApprover = new DepartmentApprover("系主任");
        CollegeApprover collegeApprover = new CollegeApprover("院长");
        departmentApprover.setApprover(collegeApprover);

        SchoolMasterApprover schoolMasterApprover = new SchoolMasterApprover("校长");
        collegeApprover.setApprover(schoolMasterApprover);

        departmentApprover.processRequest(purchaseRequest1);
        departmentApprover.processRequest(purchaseRequest2);
        departmentApprover.processRequest(purchaseRequest3);
    }
}
